home *** CD-ROM | disk | FTP | other *** search
- 10 FULLW 2
- 20 CLEARW 2: PRINT "FINANCIAL PACKAGE"
- 30 PRINT "copyright (c) 1985"
- 40 PRINT "Dr. Michael W. Ecker"
- 50 PRINT "Recreational Mathemagical Software"
- 60 PRINT "129 Carol Drive"
- 70 PRINT "Clarks Summit, PA 18411"
- 80 PRINT: INPUT " --more-- "; x$
- 85 clearw 2
- 90 PRINT "(This program appears in the February, 1986 issue of Computer"
- 100 PRINT "Shopper. It was written for the TRS-80 Model 100, but needed"
- 110 PRINT "only very minor changes for it to run on the ST. If you're"
- 120 PRINT "wondering, as I was, what the heck annuities are, the book"
- 130 print "'How to Buy Stocks' has this to say, 'A wide variety of"
- 135 print "annuities, some of them tax sheltered, are available from"
- 140 print "the various fund families, brokerage houses, and insurance"
- 145 print "companies. These are self-imposed long-term savings programs"
- 150 print "with no maximum limits on their contributions.')"
- 155 print " --Wade LaPan"
- 170 PRINT:INPUT " --more-- ";X$
- 180 CLEARW 2
- 190 PRINT "MENU OF PROGRAMS"
- 200 PRINT "================"
- 210 PRINT "1) COMPOUND INTEREST"
- 220 PRINT "2) ANNUITY PLANNING"
- 230 PRINT "3) LOAN AMORTIZATION"
- 240 PRINT "4) QUIT PROGRAM"
- 250 PRINT
- 260 INPUT "CHOICE NUMBER (1,2,3,4)";N
- 270 IF N = 4 THEN END
- 280 IF N<>1 AND N<>2 AND N<>3 THEN 260
- 290 CLEARW 2: ON N GOSUB 310,550,1100
- 300 CLEARW 2: GOTO 180
- 310 PRINT "===COMPOUND INTEREST CALCULATION==="
- 320 print "==================================="
- 330 PRINT "I'll ask you the amount you wish to"
- 340 PRINT "deposit (one deposit only) followed"
- 350 PRINT "by the interest rate (percent) and the"
- 360 PRINT "term in years, as well as the number"
- 370 PRINT "of times per year interest is given"
- 375 PRINT "(i.e., how many times per year it is compounded)."
- 380 PRINT: INPUT "Enter to continue";X$
- 390 CLEARW 2
- 400 INPUT "Principal (no dollar sign)";P
- 410 IF P<0 THEN 400
- 420 INPUT "Annual interest rate (percent)";I:R=I/100
- 430 IF I<0 THEN 420
- 440 INPUT "Time (number of years)";T
- 450 INPUT "How many times compounded per year (interest)";N
- 460 PRINT:INPUT "Enter for results";X$
- 470 CLEARW 2: PRINT "At the end of the period you will have"
- 480 A=P*(1+R/N)^(N*T)
- 490 A=INT(100*A)/100
- 500 PRINT "$";A
- 510 PRINT
- 520 INPUT "Do more interest calculations? (Y or N)";R$
- 530 IF R$="Y" OR R$="y" THEN 390
- 540 RETURN
- 550 PRINT "===ANNUITY PLANNING==="
- 560 PRINT "======================"
- 570 PRINT "In this portion you can make financial"
- 580 PRINT "projections of retirement income."
- 590 PRINT: INPUT "Enter for more---";X$
- 600 CLEARW 2
- 610 PRINT "I'll ask you how much you wish to"
- 620 PRINT "save or deposit each period. That is"
- 630 print "specify the constant amount you will"
- 640 PRINT "deposit each period. Then give the"
- 650 print "expected average high and low interest"
- 660 print "rates (or any two rates - percents),"
- 670 print "followed by the period of payments in"
- 680 print "years.";: print " ";:input "More ---->";X$
- 690 clearw 2: print "Also give the number of payments per"
- 700 print "year when asked for the frequency."
- 710 print "Interest is assumed to be given for any"
- 720 print "previous balance at payment times.":print
- 730 input "Ready to begin? (Enter)";X$
- 740 clearw 2
- 750 input "Principal (periodic payment)";P
- 760 if P<0 then 750
- 770 input "First interest rate";I1
- 780 if I1<0 then 770
- 790 I1=I1/100
- 800 INPUT "Second interest rate";I2
- 810 if I2<0 then 800
- 820 I2=I2/100
- 830 Input "Payment frequency (number per year)";N
- 840 if N<0 or N<>int(N) then 830
- 850 input "Time in years";T
- 860 print
- 870 Input "Enter for results ---->";X$
- 880 clearw 2
- 890 print "Period ";
- 900 print "Balance #1 ";"Balance #2"
- 910 print "=================================="
- 920 for DL=1 to 1000:next DL
- 930 S1=0: S2=0: rem 2 rates, 2 sums
- 940 for period=1 to N*T
- 950 S1=(1+I1/N)*S1+P
- 960 S2=(1+I2/N)*S2+P
- 970 S1=INT(S1*100)/100
- 980 S2=INT(S2*100)/100
- 990 PRINT "Period";period;" ";S1,S2
- 1000 NEXT period
- 1010 print "==================================="
- 1020 print "Balances: "; INT(100*S1*(1+I1/N))/100;
- 1030 PRINT" ";INT(100*S2*(1+I2/N))/100
- 1040 FOR DL=1 TO 1000:NEXT DL
- 1050 PRINT "Do more annuities (A)?"
- 1060 print "Or return to menu (M)?"
- 1070 input "Touch M or A, then Enter";N$
- 1080 if N$="M" or N$="m" then return
- 1090 if N$="A" or N$="a" then 600
- 1100 PRINT "===QUICK LOAN AMORTIZATION==="
- 1110 print "============================="
- 1120 print: print "Answer the questions"
- 1130 print "and the computer will provide your"
- 1140 print "monthly payment amount."
- 1150 print: input "More ----->";X$
- 1160 clearw 2
- 1170 input "Principal (amount borrowed)";P
- 1180 input "Annual interest rate (percent)";R
- 1190 R=R/100
- 1200 INPUT "Term of loan (number of years)";T
- 1210 print
- 1220 print "Your monthly payment amount is";
- 1230 A=P*R/(12*(1-(12/(12+R))^(12*T)))
- 1240 A=INT(100*A+.5)/100
- 1250 PRINT A
- 1260 PRINT: INPUT "L for more loans, M for menu";X$
- 1270 if X$="L" or X$="l" then 1100
- 1280 if X$="M" or X$="m" then return
- 1290 end
- əWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW